class MyQueue {
public:
    MyQueue() {

    }

    void push(int x) {
        _pushSt.push(x);
    }

    int pop() {
        if (empty()) return -1;
        int top = peek();
        _popSt.pop();
        return top;
    }

    int peek() {
        if (!_popSt.empty())
        {
            return _popSt.top();
        }
        else
        {
            while (!_pushSt.empty())
            {
                int top = _pushSt.top();
                _pushSt.pop();
                _popSt.push(top);
            }
        }
        return _popSt.top();
    }

    bool empty() {
        return _pushSt.empty() && _popSt.empty();
    }
private:
    stack<int> _pushSt;
    stack<int> _popSt;
};

/**
 * Your MyQueue object will be instantiated and called as such:
 * MyQueue* obj = new MyQueue();
 * obj->push(x);
 * int param_2 = obj->pop();
 * int param_3 = obj->peek();
 * bool param_4 = obj->empty();
 */

class Solution {
public:
    int multiply(int A, int B) {
        if (!B) return 0;
        return A + multiply(A, B - 1);
    }
};